** Non-split stacks

if $ver > 32 & $ver < 99999 {
global myear= floor($ver/10)
global tw = $ver - $myear * 10
global eyear = $myear + (($tw - 1)/2) + 1
global drop_pt    =  1 // 1 == drop part-time spells (Trainees are counted as pt workers)
global drop_short = 32 // 0 == keep all spells; if > 0: drop short spells < (set number) of daysyear = floor($ver /10)
global syear = $myear - (($tw - 1)/2) - 1
/* Note: (marginal) part-time spells and short spells are dropped before calculating gaps between spells and before generating toid */
global N_gap = 32 // Set criterion for gap being considered "N": EE flow if gap[_n+1] <  $N_gap; EN flow if gap[_n+1] >= $N_gap
global drop_size = 10 // do not consider establishments with on average <= x workers in hockey sticks; size estimated using sample obs; 0 == no drop!
global min_size = 0 // only keep establishment if min_size >= x in all years; 0 if not used
}

** Entire time period
if $ver == 3 {
global syear = 1997 // giving us 1998-2018
global eyear = 2019
global drop_pt    =  1 // 1 == drop part-time spells (Trainees are counted as pt workers)
global drop_short = 32 // 0 == keep all spells; if > 0: drop short spells < (set number) of days
/* Note: (marginal) part-time spells and short spells are dropped before calculating gaps between spells and before generating toid */
global N_gap = 32 // Set criterion for gap being considered "N": EE flow if gap[_n+1] <  $N_gap; EN flow if gap[_n+1] >= $N_gap
global drop_size = 10 // do not consider establishments with on average <= x workers in hockey sticks; size estimated using sample obs; 0 == no drop!
global min_size = 0 // only keep establishment if min_size >= x in all years; 0 if not used
}


*** For split samples:
 
** Splits of full sample
if $ver == 31 {
global syear = 1997 // giving us 1998-2018
global eyear = 2019
global drop_pt    =  1 // 1 == drop part-time spells (Trainees are counted as pt workers)
global drop_short = 32 // 0 == keep all spells; if > 0: drop short spells < (set number) of days
/* Note: (marginal) part-time spells and short spells are dropped before calculating gaps between spells and before generating toid */
global N_gap = 32 // Set criterion for gap being considered "N": EE flow if gap[_n+1] <  $N_gap; EN flow if gap[_n+1] >= $N_gap
global drop_size = 5 // do not consider establishments with on average <= x workers in hockey sticks; size estimated using sample obs; 0 == no drop!
global min_size = 0 // only keep establishment if min_size >= x in all years; 0 if not used
}
if $ver == 32 {
global syear = 1997 // giving us 1998-2018
global eyear = 2019
global drop_pt    =  1 // 1 == drop part-time spells (Trainees are counted as pt workers)
global drop_short = 32 // 0 == keep all spells; if > 0: drop short spells < (set number) of days
/* Note: (marginal) part-time spells and short spells are dropped before calculating gaps between spells and before generating toid */
global N_gap = 32 // Set criterion for gap being considered "N": EE flow if gap[_n+1] <  $N_gap; EN flow if gap[_n+1] >= $N_gap
global drop_size = 5 // do not consider establishments with on average <= x workers in hockey sticks; size estimated using sample obs; 0 == no drop!
global min_size = 0 // only keep establishment if min_size >= x in all years; 0 if not used
}

** Splits of stacks
if $ver > 99999 {
global ver2 = floor($ver / 10)
global myear= floor($ver2/10)
global tw = $ver2 - $myear * 10
global eyear = $myear + (($tw - 1)/2) + 1
global drop_pt    =  1 // 1 == drop part-time spells (Trainees are counted as pt workers)
global drop_short = 32 // 0 == keep all spells; if > 0: drop short spells < (set number) of daysyear = floor($ver /10)
global syear = $myear - (($tw - 1)/2) - 1
/* Note: (marginal) part-time spells and short spells are dropped before calculating gaps between spells and before generating toid */
global N_gap = 32 // Set criterion for gap being considered "N": EE flow if gap[_n+1] <  $N_gap; EN flow if gap[_n+1] >= $N_gap
global drop_size = 5 // do not consider establishments with on average <= x workers in hockey sticks; size estimated using sample obs; 0 == no drop!
global min_size = 0 // only keep establishment if min_size >= x in all years; 0 if not used, reduced from 10 to 5, because 50% random sample
}
